<!--关注作者-->
<style type="text/css">
.info_gz{
	height:50px;
	position:relative;
	margin-bottom:20px;
	margin-top:10px;
}
.info_gz .user-icon{
	width:50px;
	height:50px;
	border-radius:100%;
}
.info_gz .user-name{
	position:absolute;
	left:60px;
	top:0px;
}
.info_gz .user-name a{
	font-weight:bold;
	color:#333;
}
.info_gz .user-group{
	position:absolute;
	left:60px;
	bottom:0px;
	color:#999;
	font-size:13px;
}
.info_gz .gz-btn{
	position:absolute;
	right:0px;
	top:10px;
	padding: 2px 15px;
	background:#f54242;
	color:#fff;
	border-radius:5px;
}
</style>
<div class="info_gz">
	<a href="{:get_url('user',$info.uid)}"><img class="user-icon" src="{$info.uid|get_user_icon}" /></a>
	<div class="user-name"><a href="{:get_url('user',$info.uid)}">{:get_user($info.uid)['nickname']}</a></div>
	<div class="user-group">{:format_time($info.create_time,true)} - {:getGroupByid(get_user($info.uid)['groupid'])}</div>
	<span class="gz-btn">关注</span>
</div>
<script type="text/javascript">
$(function(){
	function gz(){
		$.get("{:murl('member/wxapp.friend/add',['uid'=>$info.uid])}",function(res){
			if(res.code==0){
				$(".gz-btn").html('已关注').off("click").click(ungz);
				layer.msg(res.msg);
			}else{
				layer.alert(res.msg);
			}
		});
	}
	function ungz(){
		layer.confirm("你要取消关注吗?",{},function(){
			$.get("{:murl('member/wxapp.friend/del',['uid'=>$info.uid])}",function(res){
				if(res.code==0){
					$(".gz-btn").html('关注').off("click").click(gz);
					layer.msg("你已取消关注");
				}else{
					layer.alert(res.msg);
				}
			});
		});
	}
	$.get("{:murl('member/wxapp.friend/ckgz',['uid'=>$info.uid])}",function(res){
		if(res.code==0){
			$(".gz-btn").html('已关注').click(ungz);
		}else{
			$(".gz-btn").click(gz);
		}
	});
});
</script>